package com.zretc.news.service.impl;

import com.zretc.news.dao.NewsDao;
import com.zretc.news.dao.impl.NewsDaoImpl;
import com.zretc.news.entity.News;
import com.zretc.news.service.NewsService;
import com.zretc.tools.PageData;

/**
 * 新闻的service实现类
 * 
 * @author admin
 *
 */
public class NewsServiceImpl implements NewsService {

	// 调用的是News的dao对象
	NewsDao newsDao = new NewsDaoImpl();

	@Override
	public boolean addNews(News news) {
		// 记得这里要判断newstitle是否重复
		//大家记得要写
		return newsDao.addNews(news);
	}
	
	@Override
	public PageData<News> getNewsByPage(int page, int pageSize, String keywords) {
		// TODO Auto-generated method stub
		return newsDao.getNewsByPage(page, pageSize, keywords);
	}

}
